/*
 * Copyright (c) 2018-2999 广州市蓝海创新科技有限公司 All rights reserved.
 *
 * https://www.mall4j.com/
 *
 * 未经允许，不可做商业用途！
 *
 * 版权所有，侵权必究！
 */

package com.wskj.workbench.enums;

import com.wskj.common.enums.BaseEnum;
import lombok.Getter;

import java.util.Objects;


@Getter
public enum UserWalletDetailRecommendTypeEnum implements BaseEnum<String> {


    ZHITUI("1", "直推"),

    JIANTUI("2", "间推");

    private String value;

    private String desc;

    UserWalletDetailRecommendTypeEnum(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    public static UserWalletDetailRecommendTypeEnum getEnumByValue(String value) {
        if (Objects.isNull(value)) {
            return null;
        }
        for (UserWalletDetailRecommendTypeEnum item : UserWalletDetailRecommendTypeEnum.values()) {
            if (item.value.equals(value)) {
                return item;
            }
        }
        return null;
    }
}
